package cn.sczc.jh.client.mapper.sys;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import cn.sczc.jh.client.entity.Role;
import cn.sczc.jh.client.entity.RolePermissionRef;

public interface RoleMapper extends BaseMapper<Role> {

	List<Role> getRoleByParams(Page<Role> page, @Param("params") Map<String, Object> params);

	List<Long> getPermissionIdList(Long roleId);

	void delRolePermissionByRoleId(Long roleId);

	void batchAddRolePermission(@Param("list") List<RolePermissionRef> rolePermissionRefs);

	List<Role> getRoleListByUserId(Long userId);

	List<Role> getRoleList();

}
